#include <stdio.h>
int main(){
	int bas,k;
	int n1,b,t,n2;
	scanf("%d%d",&bas,&k);
	for(int i=0;i<k;i++){
		
		scanf("%d%d%d%d",&n1,&b,&t,&n2);
	if((n2>n1&&b==1)||(n2<n1&&b==0)){
		bas+=t;
		printf("Win %d! Total=%d.\n",t,bas);
	}else{
		bas-=t;
		if(bas==0){
		printf("Lose %d. Total=0.\n",t);
		printf("Game Over!\n");	
		}else if(bas<0){
		printf("Not enough tokens. Total=%d",bas+t);	
		}else{
			printf("Lose %d. Total=%d.\n",t,bas);
		} 
	}		
	}

	return 0;
}
